using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iopt.solvency.pillarone.client.desktop.Views;
using Microsoft.VisualBasic;
using System.Collections;
using System.Diagnostics;
using System.Xml.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Runtime.CompilerServices;

namespace iopt.solvency.pillarone.client.desktop.ViewModels
{
    public enum ModelParamUnderLyingType
    {
        Mixed,
        Double,
        Boolean,
        Time,
        Date,
        Case,
        Uncertain        
    }

    public static class ModelParamUnderLyingTypeExtension
    {
        public static Type GetTypeFromUnderLyingType(this ModelParamUnderLyingType utype)
        {
            switch (utype)
            {
                case ModelParamUnderLyingType.Boolean:
                    return typeof(bool);
                case ModelParamUnderLyingType.Case:
                    //dynamic result = new CodeTypeReference(Name + "." + "Cases");
                    return typeof(string);
                case ModelParamUnderLyingType.Date:
                    return typeof(DateTime);
                case ModelParamUnderLyingType.Double:
                    return typeof(double);
                case ModelParamUnderLyingType.Mixed:
                    return typeof(object);
                case ModelParamUnderLyingType.Time:
                    return typeof(TimeSpan);
                case ModelParamUnderLyingType.Uncertain:
                    //	new CodeTypeReference(typeof(UncertainValue))
                    return typeof(object);
            }

            return  typeof(object);
        }
    }
}
